<?php
include_once("../functions.php");
session_start();
check_valid_user();

$filename = "./temp_dir/vlinkconf_" . date("Ymd") . ".xml";
$handle = fopen($filename, "w");
fwrite($handle, export_xml($_SESSION["loadname"]));

echo fread($handle, filesize($filename));
//echo readfile($filename);
fclose($handle);
?>
<a href="<?php echo $filename; ?>">Download</a>
